package donnees;
import java.util.ArrayList;


/**
 * @author  Jennifer Henry
 */

public class Route {
	String nom;
	ArrayList<Troncon> troncons;
	TypeRoute type;
	public Route(String n) {
		nom = n;
		troncons = new ArrayList<Troncon>();
		type = null;
	}
	public String toString() {
		return nom;
	}
	public String getNom() {
		return nom;
	}
	public ArrayList<Troncon> getTroncons() {
		return troncons;
	}
	public void addTroncon (Troncon t) {
		if (!troncons.contains(t)) {
			troncons.add(t);
		}
	}
	public boolean removeTroncon (Troncon t) {
		return troncons.remove(t);
	}
	public TypeRoute getType() {
		return type;
	}
	public void setType(TypeRoute _type) {
		type = _type;
	}
}